package com.zking.seckillpro;

/**
 * 阶乘求和
 * 1！+2！+...+n!
 */
public class www {
    public static void main(String[] args) {
        Long sum=0L;
        for(Long i=1L;i<=5L;i++){
            sum+=jc(i);
        }
        System.out.println(sum);
    }
    public static Long jc(Long n){
        Long jg=0L;
        if(n==1L){
            return  1L;
        }
        jg=n*jc(n-1);
        return jg;
    }
}
